Skip to main content

Overview

Setting up a new motor is quite straight forward. Initially you’ll need to solder on the 3 motor phases, power up the board, and then proceede to configuring the ACB v2.0. On this new motor the ACB needs a few pieces of information to operate:
  • The numeber of Pole Pairs (half the number of poles).
  • The relative orientation of the encoder magnet. This is also known as the zero electrical angle. (if using closed loop control).
  • PID parameters for controlling the velocity, position, and torque.
There’s a wizard available in the OpenActuator GUI. Navigate to “Tools/Setup New actuator” in the menubar. You’ll be propted to enter in the Pole Pairs, and then you may proceede with the calibration.

Manual PID tuning

When tuning the PID loops theres a few layers of tuning deending on what mode you’re operating in. For example, positional control requires the velocity and torque controllers to already be tuned. Tuning the Velocity or Torque parameters is normall the best place to start, and sometimes torque can be tricky due to cogging (the motor getting stuck at a specific angle). Torque tuning also only applies when not using the voltage mode for controlling current. Good starting parameters for the PID values for the 7 pole pair motor included with the Motor Test Mount are:
vel_p   0.25
vel_i   1.0
vel_d   0.0
pos_p   20.0
pos_i   1.0
pos_d   0.0
curr_p  0.5
curr_i  0.1
curr_d  0.001
When the ACB is connected to the GUI you’ll see the parameters in the left panel that you’re able to set freely. Here’s an example tuning proceedure when tuning the Motor Test Mount setup:
  1. Set the velocity PID values to 0, and the velocity P value to something low like 0.1.
  2. Set the velocity target to 400. Going too low is not good for tuning.
  3. Observe the steady state velocity, and increase P until you’re at the target velocity value.
  4. Increase the integral value until the velocity reaches the target value.
  5. You can normally ignore the D value, but it can help remove some noise (but is also very influenced by it). Keep the D value low to around 0.001 - but try higher values so you can get a feel for it.
Some useful points I’ve come across:
  • Either the P or I value is too large if you start oscillating a lot. Probably P in most cases.
  • If you hear a “bitty” sound, or something that sounds almost like white noise in the motor, it’s probably because the P/I values are too high in the current tuning. Lower them and introduce a very small D value.
  • If you have large oscillations in the position mode make sure that the velocity mode is tuned.
  • Check that the encoder magnet is close to the encoder sensor. When it’s too far away then there’s potential for noise to take over the angle detection.
Auto calibration for the PID variables is being worked on, check back for updates!